<!DOCTYPE html>
<!---
  Copyright 2010 Karl Ostmo

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>jobfeed</title>
    
    <link rel="SHORTCUT ICON" href="/static/images/shortlogo16.png"/>
    
    <link type="text/css" rel="stylesheet" href="/static/css/app.css"/>


  <script type="text/javascript">
  var loaded_skills = {{loaded_skills}};
  var years_bins = {{years_bins}};
  </script>
  
  <script type="text/javascript" src="/static/js/skills.js"></script>
  <script type="text/javascript" src="/static/js/profile.js"></script>
  <script type="text/javascript" src="/static/js/profile_old.js"></script>

  </head>
  <body onload="loadSearch()">

    <div id="login-bar">
      {% if current_user %}
        <strong>{{ current_user.email }}</strong>
        &nbsp;|&nbsp;
        <a href="{% logout_url %}">Sign out</a>
      {% else %}
        <a href="{% login_url %}">Sign in</a>
      {% endif %}
    </div>

<p>Only qualifications that have been used in an actual job posting are listed.</p>
<p>Years of experience are rounded down to the next highest bin: {{years_bins}}.</p>
<p><b>Used count:</b> <span id="checkbox_counter">0</span></p>

  <form action="/save" method="post" onsubmit="return saveSearch(this)" name="save_form">
  <table border="1"><caption>Qualifications</caption>
  <tr>
  {% for skill_list_pair in skills_lists %}
  <td style="vertical-align:top; horizontal-align:center"><table id="table_{{skill_list_pair.category}}">
  
  <tr><td style="vertical-align:top">
  <label for="dropdown_{{skill_list_pair.category}}">{{skill_list_pair.label}}:</label><br/>
  <button type="button" onclick="clickAddSkill('{{skill_list_pair.category}}')">Add</button> <select id="dropdown_{{skill_list_pair.category}}" width="100%">
    {% for skill in skill_list_pair.skills_list %}
    <option value="{{skill.key}}">{{skill.name}}</option>
    {% endfor %}
  </select>
  </td></tr></table>
  <button type="button" onclick="removeCheckedSkills('{{skill_list_pair.category}}')" style="margin-left: auto; margin-right: auto;">Remove checked</button>
  </td>
  {% endfor %}
  </tr></table>

  <input type="hidden" name="skill_keys" />
  <!--<input type="button" onclick="subm()" value="Save current"/>-->
  <input type="submit" value="Save current"/> as <input type="text" name="saved_name" value="Untitled"/>
  </form>

  <form action="/profile" method="get" name="load_form">
  <label for="saved_searches">Previously saved: </label>
  <select name="load_key" id="saved_searches">
    {% for saved_search in saved_searches %}
    <option value="{{saved_search.key}}">{{saved_search.title}}</option>
    {% endfor %}
  </select> <input type="button" value="Reset" onclick="clearForm()" /> <br />
  <button>Load</button> <button onclick="deleteSaved()" type="button">Delete</button>
  <input type="hidden" name="deleting" value="false" />

  </form>

  [<a href="/">home</a>]

  </body>
</html>
